package cn.com.api.service.impl.base;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.com.api.entity.ApiT_city;

import cn.com.api.mapper.ApiT_cityMapper;

import cn.com.api.service.ApiT_cityService;

/**
 * 
 **/
@Service
public class T_cityServiceImplBase {
	@Autowired
	private ApiT_cityMapper apiT_cityMapper;
    
    // 根据id获取
	public ApiT_city findT_cityById(Integer id){
		ApiT_city t_city = apiT_cityMapper.findT_cityById( id );
		return t_city;
	}
    
    //查看数据集
	public List<ApiT_city> findT_citys(){
        List<ApiT_city> t_citys = apiT_cityMapper.findT_citys();
		return t_citys;
    }
    
	// 添加
	public int insertT_city(ApiT_city t_city){
		int ret_I= apiT_cityMapper.insertT_city(t_city);
		return ret_I;
	}

	// 修改
	public int updateT_city(ApiT_city t_city){
		int ret_I= apiT_cityMapper.updateT_city(t_city);
		return ret_I;
	}
	
    // 删除
	public int deleteT_city(Integer id){
		int ret_I= apiT_cityMapper.deleteT_city( id );
		return ret_I;
	}
	
    // Foreign keys revelant		
		

	//region Indexs revelant
    
    
    //获取根据is_open	
    public List<ApiT_city> findT_citysByIs_open(String is_open){
        List<ApiT_city> t_citys = apiT_cityMapper.findT_citysByIs_open(is_open);
		return t_citys;
    }
    		
    //获取根据pid	
    public List<ApiT_city> findT_citysByPid(String pid){
        List<ApiT_city> t_citys = apiT_cityMapper.findT_citysByPid(pid);
		return t_citys;
    }
    		
    //获取根据sort	
    public List<ApiT_city> findT_citysBySort(String sort){
        List<ApiT_city> t_citys = apiT_cityMapper.findT_citysBySort(sort);
		return t_citys;
    }
    		
    //获取根据uname	
    public List<ApiT_city> findT_citysByUname(String uname){
        List<ApiT_city> t_citys = apiT_cityMapper.findT_citysByUname(uname);
		return t_citys;
    }
    		
    
    
}


